package com.jiang.annotation.aop.retryable;

import org.springframework.stereotype.Service;

@Service
public class RetryableService {

    @Retryable(maxAttempts = 3)
    public String doSomething() throws Exception {
        // 需要重试的逻辑
        System.out.println("Doing something...");
        throw new Exception("Something went wrong!");
    }
}

